<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class AddFieldReplyToPositionSuperviseSheetTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('position_supervise_sheet', function (Blueprint $table) {
            $table->text('reply_images')->nullable()->comment('回复图片')->after('address');
            $table->text('reply_txt')->nullable()->comment('回复文字')->after('reply_images');
            $table->unsignedBigInteger('admin_id',false)->default(0)->comment('回复人id')->after('reply_txt');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('position_supervise_sheet', function (Blueprint $table) {
            $table->dropColumn('reply_images');
            $table->dropColumn('reply_txt');
            $table->dropColumn('admin_id');
        });
    }
}
